<%@ Page Title="" MasterPageFile="~/BackOffice.master" Language="C#" AutoEventWireup="true"
    CodeBehind="CadastroImovel.aspx.cs" Inherits="MakeIT.Alf.Site.Apresentacao.CadastroImovel" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="cHeadHttpEquiv" ContentPlaceHolderID="headHttpEquiv" runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
</asp:Content>
<asp:Content ID="cHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="cCadastro" ContentPlaceHolderID="cphTituloCadastro" runat="server">
    Cadastro de Im&oacute;vel (imovel)
</asp:Content>
<asp:Content ID="cMain" ContentPlaceHolderID="cphMain" runat="server">
    <asp:UpdatePanel ID="upnImovel" runat="server">
        <ContentTemplate>
            <asp:TabContainer ID="tabImovel" runat="server" ActiveTabIndex="0">
                <asp:TabPanel ID="tabPesquisa" runat="server" HeaderText="Pesquisa">
                    <ContentTemplate>
                        <div style="width: 100%; background-color: #eeeeff; min-width: 400px; min-height: 300px;">
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td valign="middle" style="width: 24px;">
                                        <asp:ImageButton ID="ibPesquisa" runat="server" OnClick="btnPesquisa_Click" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/search.png"
                                            ToolTip="Executa a pesquisa aplicando os filtros" />
                                    </td>
                                    <td valign="middle" align="left" rowspan="2">
                                        Filtros:
                                    </td>
                                    <td>
                                        <table style="width: 100%;">
                                            <tr>
                                                <td>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            C&oacute;digo:</div>
                                                        <asp:TextBox ID="txtIdImovel" MaxLength="11" Width="76px" onkeypress="strictNum();"
                                                            ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            T&iacute;tulo:</div>
                                                        <asp:TextBox ID="txtTitulo" MaxLength="45" Width="100px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Imedia&ccedil;&otilde;es:</div>
                                                        <asp:TextBox ID="txtImediacoes" MaxLength="50" Width="100px" ForeColor="DarkBlue"
                                                            Font-Bold="True" runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Zelador:</div>
                                                        <asp:TextBox ID="txtZelador" MaxLength="50" Width="100px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Vago:</div>
                                                        <asp:TextBox ID="txtVago" MaxLength="20" Width="100px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Permuta:</div>
                                                        <asp:DropDownList ID="ddlPermuta" ForeColor="DarkBlue" Font-Bold="True" runat="server">
                                                            <asp:ListItem Text="Todos" Value=" "></asp:ListItem>
                                                            <asp:ListItem Text="Sim" Value="S"></asp:ListItem>
                                                            <asp:ListItem Text="N&atilde;o" Value="N"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Placa:</div>
                                                        <asp:TextBox ID="txtPlaca" MaxLength="20" Width="100px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Chaves:</div>
                                                        <asp:TextBox ID="txtChaves" MaxLength="20" Width="100px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Visitas:</div>
                                                        <asp:TextBox ID="txtVisitas" MaxLength="20" Width="100px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Venda:</div>
                                                        <asp:DropDownList ID="ddlVda" ForeColor="DarkBlue" Font-Bold="True" runat="server">
                                                            <asp:ListItem Text="Todos" Value=" "></asp:ListItem>
                                                            <asp:ListItem Text="Sim" Value="S"></asp:ListItem>
                                                            <asp:ListItem Text="N&atilde;o" Value="N"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Loca&ccedil;&atilde;o:</div>
                                                        <asp:DropDownList ID="ddlLoc" ForeColor="DarkBlue" Font-Bold="True" runat="server">
                                                            <asp:ListItem Text="Todos" Value=" "></asp:ListItem>
                                                            <asp:ListItem Text="Sim" Value="S"></asp:ListItem>
                                                            <asp:ListItem Text="N&atilde;o" Value="N"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="FormDiv">
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Tipo Im&oacute;vel:</div>
                                                            <asp:DropDownList ID="ddlTipoImovel" runat="server" ForeColor="DarkBlue" Font-Bold="True"
                                                                DataTextField="imovelTipo" DataValueField="PKString" AutoPostBack="true" OnSelectedIndexChanged="ddlTipoImovel_SelectedIndexChanged">
                                                            </asp:DropDownList>
                                                        </div>
                                                        <div class="FormLabel">
                                                            Categoria:</div>
                                                        <asp:DropDownList ID="ddlIdImovelCat" Width="76px" ForeColor="DarkBlue" Font-Bold="True"
                                                            runat="server" DataTextField="imovelCat" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Dorms:</div>
                                                        <asp:TextBox ID="txtDorms" MaxLength="11" Width="76px" onkeypress="strictNum();"
                                                            ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Vagas:</div>
                                                        <asp:TextBox ID="txtVagas" MaxLength="11" Width="76px" onkeypress="strictNum();"
                                                            ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Valor&nbsp;Venda:</div>
                                                        <asp:TextBox ID="txtVlrVda" MaxLength="12" Width="82px" onkeypress="mascaraMoeda();"
                                                            ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Valor&nbsp;Loca&ccedil;&atilde;o:</div>
                                                        <asp:TextBox ID="txtVlrLoc" MaxLength="12" Width="82px" onkeypress="mascaraMoeda();"
                                                            ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Valor&nbsp;Minimo:</div>
                                                        <asp:TextBox ID="txtValorMinimo" MaxLength="12" Width="82px" onkeypress="mascaraMoeda();"
                                                            ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Valor&nbsp;Maximo:</div>
                                                        <asp:TextBox ID="txtValorMaximo" MaxLength="12" Width="82px" onkeypress="mascaraMoeda();"
                                                            ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Estado:</div>
                                                        <asp:DropDownList ID="ddlEstado" runat="server" ForeColor="DarkBlue" Font-Bold="True"
                                                            AutoPostBack="true" DataTextField="estado" DataValueField="PKString" OnSelectedIndexChanged="ddlEstado_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Cidade:</div>
                                                        <asp:DropDownList ID="ddlCidade" runat="server" ForeColor="DarkBlue" Font-Bold="True"
                                                            AutoPostBack="true" DataTextField="cidade" DataValueField="PKString" OnSelectedIndexChanged="ddlCidade_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Bairro:</div>
                                                        <asp:DropDownList ID="ddlBairro" runat="server" ForeColor="DarkBlue" Font-Bold="True"
                                                            DataTextField="bairro" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Ativo:</div>
                                                        <asp:DropDownList ID="ddlAtivo" ForeColor="DarkBlue" Font-Bold="true" runat="server">
                                                            <asp:ListItem Text="Todos" Value=" "></asp:ListItem>
                                                            <asp:ListItem Text="Sim" Value="S"></asp:ListItem>
                                                            <asp:ListItem Text="N&atilde;o" Value="N"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Promotor:</div>
                                                        <asp:DropDownList ID="ddlIdPromotor" ForeColor="DarkBlue" Font-Bold="true" runat="server"
                                                            DataTextField="nome" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Indicador:</div>
                                                        <asp:DropDownList ID="ddlIdIndicador" ForeColor="DarkBlue" Font-Bold="true" runat="server"
                                                            DataTextField="nome" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="FormDiv">
                                                        <div class="FormLabel">
                                                            Cliente:</div>
                                                        <asp:DropDownList ID="ddlIdCliente" ForeColor="DarkBlue" Font-Bold="true" runat="server"
                                                            DataTextField="nome" DataValueField="PKString">
                                                        </asp:DropDownList>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                            <hr />
                            <asp:GridView ID="grvResultado" runat="server" AutoGenerateColumns="False" EmptyDataText="N&atilde;o foram encontrados registros nessa pesquisa!"
                                CellPadding="1" ForeColor="#333333" EnableModelValidation="True">
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <Columns>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:ImageButton ID="imgbVisualizar" runat="server" OnClick="imgbVisualizar_Click"
                                                ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>'
                                                ToolTip="Abrir formulário completo" />
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="idImovel" HeaderText="C&oacute;digo" DataFormatString="{0:N0}" />
                                    <asp:TemplateField HeaderText="Ativo?" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:Label ID="lblativo" runat="server" Text='<%# Eval("ativo")!=null?(bool)Eval("ativo")?"Sim":"N&atilde;o":"" %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="titulo" HeaderText="T&iacute;tulo" />
                                    <asp:BoundField DataField="idLogradouroVO" HeaderText="Endere&ccedil;o" />
                                    <asp:BoundField DataField="endNum" HeaderText="N&uacute;mero" />
                                    <asp:BoundField DataField="endCom" HeaderText="Complemento" />
                                    <asp:TemplateField HeaderText="Venda?" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:Label ID="lblvda" runat="server" Text='<%# Eval("vda")!=null?(bool)Eval("vda")?"Sim":"N&atilde;o":"" %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="vlrVda" HeaderText="$Venda" DataFormatString="{0:N2}"
                                        ItemStyle-HorizontalAlign="Right" />
                                    <asp:TemplateField HeaderText="loca&ccedil;&atilde;o?" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:Label ID="lbllocacao" runat="server" Text='<%# Eval("loc")!=null?(bool)Eval("loc")?"Sim":"N&atilde;o":"" %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="vlrLoc" HeaderText="$Loca&ccedil;&atilde;o" DataFormatString="{0:N2}"
                                        ItemStyle-HorizontalAlign="Right" />
                                    <asp:BoundField DataField="quartos" HeaderText="Dormit&oacute;rio" DataFormatString="{0:N0}"
                                        ItemStyle-HorizontalAlign="Right" />
                                </Columns>
                                <EditRowStyle BackColor="#999999" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            </asp:GridView>
                        </div>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="tabCadastro" runat="server" HeaderText="Cadastro">
                    <ContentTemplate>
                        <asp:Panel ID="panelCad" runat="server" BackColor="#eeeeee">
                            <div style="width: 100%; min-width: 400px; min-height: 300px;">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <asp:Panel ID="panelBotoes" runat="server">
                                                <asp:Button ID="btnSalvar" runat="server" Enabled="False" ValidationGroup="Salvar"
                                                    OnClick="btnSalvar_Click" Text="Salvar" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnCancelar" runat="server" OnClick="btnCancelar_Click" Text="Cancelar"
                                                    UseSubmitBehavior="false" />
                                                <asp:Button ID="btnEditar" runat="server" Enabled="False" OnClick="btnEditar_Click"
                                                    Text="Editar" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnExcluir" runat="server" Enabled="False" OnClick="btnExcluir_Click"
                                                    Text="Excluir" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnNovo" runat="server" OnClick="btnNovo_Click" Text="Novo"
                                                    UseSubmitBehavior="false" />
                                                <asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="btnExcluir"
                                                    ConfirmText="Confirma a exclus&atilde;o de Im&oacute;vel?">
                                                </asp:ConfirmButtonExtender>
                                                <hr />
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    C&oacute;digo:</div>
                                                <asp:TextBox ID="txtCadIdImovel" MaxLength="11" Width="76" onkeypress="strictNum();"
                                                    onblur="validaDecimal(this.value,11,0);" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                                <asp:MaskedEditExtender ID="meetxtCadIdImovel" runat="server" Mask="99999999999"
                                                    TargetControlID="txtCadIdImovel" PromptCharacter="" />
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Ativo:</div>
                                                <asp:DropDownList ID="ddlCadAtivo" ForeColor="DarkBlue" Font-Bold="true" runat="server">
                                                    <asp:ListItem Text="Sim" Value="S"></asp:ListItem>
                                                    <asp:ListItem Text="N&atilde;o" Value="N"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Destaque:</div>
                                                <asp:RadioButtonList ID="rbCadDestaque" runat="server" RepeatDirection="Horizontal"
                                                    ForeColor="DarkBlue" Font-Bold="true">
                                                    <asp:ListItem Text="Sim" Value="S" />
                                                    <asp:ListItem Text="N&atilde;o" Value="N" Selected="True" />
                                                </asp:RadioButtonList>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Tipo Im&oacute;vel:</div>
                                                <asp:DropDownList ID="ddlCadIdImovelTipo" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server" DataTextField="imovelTipo" DataValueField="PKString" AutoPostBack="true"
                                                    OnSelectedIndexChanged="ddlCadIdImovelTipo_SelectedIndexChanged">
                                                </asp:DropDownList>
                                                <asp:HyperLink ID="hlCadIdImovelTipo" runat="server" NavigateUrl="~/CadastroImoveltipo.aspx"
                                                    ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroImoveltipo"
                                                    ToolTip="Editar cadastro"></asp:HyperLink>
                                                <asp:ImageButton ID="ibCadIdImovelTipo" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                    ToolTip="Atualizar lista" OnClick="atualizarDdlIdImovelTipo" />
                                                <asp:RequiredFieldValidator ControlToValidate="ddlCadIdImovelTipo" InitialValue="-1"
                                                    ErrorMessage="Preenchimento obrigat&oacute;rio." ID="rfvddlCadIdImovelTipo" Display="None"
                                                    runat="server" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" TargetControlID="rfvddlCadIdImovelTipo">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Categoria:</div>
                                                <asp:DropDownList ID="ddlCadIdImovelCat" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server" DataTextField="imovelCat" DataValueField="PKString">
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator ControlToValidate="ddlCadIdImovelCat" InitialValue="-1"
                                                    ErrorMessage="Preenchimento obrigat&oacute;rio." ID="rfvddlCadIdImovelCat" Display="None"
                                                    runat="server" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" TargetControlID="rfvddlCadIdImovelCat">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    T&iacute;tulo:</div>
                                                <asp:TextBox ID="txtCadTitulo" MaxLength="45" Width="280" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                                <asp:RequiredFieldValidator ControlToValidate="txtCadTitulo" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                    ID="rfvtxtCadTitulo" Display="None" runat="server" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vcetxtCadTitulo" runat="server" TargetControlID="rfvtxtCadTitulo">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Descri&ccedil;&atilde;o:</div>
                                                <asp:TextBox ID="txtCadDescricao" TextMode="MultiLine" MaxLength="0" Width="400px"
                                                    Height="100px" ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                <asp:RequiredFieldValidator ControlToValidate="txtCadDescricao" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                    ID="rfvtxtCadDescricao" Display="None" runat="server" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vcetxtCadDescricao" runat="server" TargetControlID="rfvtxtCadDescricao">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Venda:</div>
                                                <asp:DropDownList ID="ddlCadVda" ForeColor="DarkBlue" Font-Bold="true" runat="server">
                                                    <asp:ListItem Text="Sim" Value="S"></asp:ListItem>
                                                    <asp:ListItem Text="N&atilde;o" Value="N"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Valor&nbsp;Venda:</div>
                                                <asp:TextBox ID="txtCadVlrVda" MaxLength="12" Width="82" onkeypress="mascaraMoeda();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Loca&ccedil;&atilde;o:</div>
                                                <asp:DropDownList ID="ddlCadLoc" ForeColor="DarkBlue" Font-Bold="true" runat="server">
                                                    <asp:ListItem Text="Sim" Value="S"></asp:ListItem>
                                                    <asp:ListItem Text="N&atilde;o" Value="N"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Valor&nbsp;Loca&ccedil;&atilde;o:</div>
                                                <asp:TextBox ID="txtCadVlrLoc" MaxLength="12" Width="82" onkeypress="mascaraMoeda();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Estado:</div>
                                                <asp:DropDownList ID="ddlCadEstado" runat="server" AutoPostBack="true" ForeColor="DarkBlue"
                                                    Font-Bold="true" OnSelectedIndexChanged="ddlCadEstado_SelectedIndexChanged" DataTextField="estado"
                                                    DataValueField="PKString">
                                                </asp:DropDownList>
                                                <asp:HyperLink ID="hlCadEstado" runat="server" NavigateUrl="~/CadastroEstado.aspx"
                                                    ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroEstado"
                                                    ToolTip="Editar cadastro"></asp:HyperLink>
                                                <asp:ImageButton ID="ibCadEstado" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                    ToolTip="Atualizar lista" OnClick="atualizarDdlEstado" />
                                                <asp:RequiredFieldValidator ControlToValidate="ddlCadEstado" InitialValue="-1" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                    ID="rfvDdlCadEstado" Display="None" runat="server" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vceDdlCadEstado" runat="server" TargetControlID="rfvDdlCadEstado">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Cidade:</div>
                                                <asp:DropDownList ID="ddlCadCidade" runat="server" AutoPostBack="true" ForeColor="DarkBlue"
                                                    Font-Bold="true" OnSelectedIndexChanged="ddlCadCidade_SelectedIndexChanged" DataTextField="cidade"
                                                    DataValueField="PKString">
                                                </asp:DropDownList>
                                                <asp:HyperLink ID="hlCadCidade" runat="server" NavigateUrl="~/CadastroCidade.aspx"
                                                    ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroCidade"
                                                    ToolTip="Editar cadastro"></asp:HyperLink>
                                                <asp:ImageButton ID="ibCadCidade" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                    ToolTip="Atualizar lista" OnClick="atualizarDdlCidade" />
                                                <asp:RequiredFieldValidator ControlToValidate="ddlCadCidade" InitialValue="-1" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                    ID="rfvDdlCadCidade" Display="None" runat="server" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vceDdlCadCidade" runat="server" TargetControlID="rfvDdlCadCidade">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Bairro:</div>
                                                <asp:DropDownList ID="ddlCadBairro" runat="server" AutoPostBack="true" ForeColor="DarkBlue"
                                                    Font-Bold="true" OnSelectedIndexChanged="ddlCadBairro_SelectedIndexChanged" DataTextField="bairro"
                                                    DataValueField="PKString">
                                                </asp:DropDownList>
                                                <asp:HyperLink ID="hlCadBairro" runat="server" NavigateUrl="~/CadastroBairro.aspx"
                                                    ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroBairro"
                                                    ToolTip="Editar cadastro"></asp:HyperLink>
                                                <asp:ImageButton ID="ibCadBairro" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                    ToolTip="Atualizar lista" OnClick="atualizarDdlBairro" />
                                                <asp:RequiredFieldValidator ControlToValidate="ddlCadBairro" InitialValue="-1" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                    ID="rfvDdlCadBairro" Display="None" runat="server" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vceDdlCadBairro" runat="server" TargetControlID="rfvDdlCadBairro">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Endere&ccedil;o:
                                                </div>
                                                <asp:DropDownList ID="ddlCadIdTipoLog" runat="server" AutoPostBack="true" ForeColor="DarkBlue"
                                                    Font-Bold="true" OnSelectedIndexChanged="ddlCadIdTipoLog_SelectedIndexChanged"
                                                    DataTextField="sigla" DataValueField="PKString">
                                                </asp:DropDownList>
                                                <asp:HyperLink ID="hlCadIdLogtipo" runat="server" NavigateUrl="~/CadastroLogtipo.aspx"
                                                    ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroLogtipo"
                                                    ToolTip="Editar cadastro"></asp:HyperLink>
                                                <asp:ImageButton ID="ibCadIdLogtipo" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                    ToolTip="Atualizar lista" OnClick="atualizarDdlLogtipo" />
                                                <asp:RequiredFieldValidator ControlToValidate="ddlCadIdTipoLog" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                    ID="rfvDdlCadIdTipoLog" Display="None" runat="server" ValidationGroup="Salvar"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vceDdlCadIdTipoLog" runat="server" TargetControlID="rfvDdlCadIdTipoLog">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Logradouro:
                                                </div>
                                                <asp:DropDownList ID="ddlCadIdLogradouro" runat="server" AutoPostBack="true" ForeColor="DarkBlue"
                                                    Font-Bold="true" OnSelectedIndexChanged="ddlCadIdLogradouro_SelectedIndexChanged"
                                                    DataTextField="logradouro" DataValueField="PKString">
                                                </asp:DropDownList>
                                                <asp:HyperLink ID="hlCadIdLogradouro" runat="server" NavigateUrl="~/CadastroLogradouro.aspx"
                                                    ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroLogradouro"
                                                    ToolTip="Editar cadastro"></asp:HyperLink>
                                                <asp:ImageButton ID="ibCadIdLogradouro" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                    ToolTip="Atualizar lista" OnClick="atualizarDdlLogradouro" />
                                                <asp:RequiredFieldValidator ControlToValidate="ddlCadIdLogradouro" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                    ID="rfvDdlCadIdLogradouro" Display="None" runat="server" ValidationGroup="Salvar"
                                                    InitialValue="-1"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vceDdlCadIdLogradouro" runat="server" TargetControlID="rfvDdlCadIdLogradouro">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <%-- div class="FormDiv">
                                                <div class="FormLabel">
                                                    CEP:
                                                </div>
                                                <asp:TextBox ID="txtCadCep" MaxLength="9" Width="64px" onKeyPress="mascaraCep();"
                                                    ForeColor="DarkBlue" Font-Bold="True" runat="server"></asp:TextBox>
                                            </div --%>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    N&uacute;mero:</div>
                                                <asp:TextBox ID="txtCadEndNum" MaxLength="20" Width="130" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Complemento:</div>
                                                <asp:TextBox ID="txtCadEndCom" MaxLength="30" Width="190" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Imedia&ccedil;&otilde;es:</div>
                                                <asp:TextBox ID="txtCadImediacoes" MaxLength="50" Width="310" ForeColor="DarkBlue"
                                                    Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Andares:</div>
                                                <asp:TextBox ID="txtCadAndares" MaxLength="3" Width="28" onkeypress="strictNum();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                <asp:MaskedEditExtender ID="meetxtCadAndares" runat="server" Mask="999" TargetControlID="txtCadAndares"
                                                    PromptCharacter="" />
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Apartamentos:</div>
                                                <asp:TextBox ID="txtCadAptoAndar" MaxLength="2" Width="22" onkeypress="strictNum();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                <asp:MaskedEditExtender ID="meetxtCadAptoAndar" runat="server" Mask="99" TargetControlID="txtCadAptoAndar"
                                                    PromptCharacter="" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Posi&ccedil;&atilde;o:</div>
                                                <asp:TextBox ID="txtCadAptoPos" MaxLength="20" Width="130" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Condom&iacute;nio:</div>
                                                <asp:TextBox ID="txtCadCondominio" MaxLength="20" Width="130" ForeColor="DarkBlue"
                                                    Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Valor&nbsp;Condom&iacute;nio:</div>
                                                <asp:TextBox ID="txtCadVlrCond" MaxLength="12" Width="82" onkeypress="mascaraMoeda();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Zelador:</div>
                                                <asp:TextBox ID="txtCadZelador" MaxLength="50" Width="310" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Vagas&nbsp;na&nbsp;Garagem:</div>
                                                <asp:TextBox ID="txtCadVagasGaragem" MaxLength="3" Width="28" onkeypress="strictNum();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                <asp:MaskedEditExtender ID="meetxtCadVagasGaragem" runat="server" Mask="999" TargetControlID="txtCadVagasGaragem"
                                                    PromptCharacter="" />
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Quartos:</div>
                                                <asp:TextBox ID="txtCadQuartos" MaxLength="3" Width="28" onkeypress="strictNum();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                <asp:MaskedEditExtender ID="meetxtCadQuartos" runat="server" Mask="999" TargetControlID="txtCadQuartos"
                                                    PromptCharacter="" />
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Su&iacute;tes:</div>
                                                <asp:TextBox ID="txtCadSuites" MaxLength="3" Width="28" onkeypress="strictNum();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                <asp:MaskedEditExtender ID="meetxtCadSuites" runat="server" Mask="999" TargetControlID="txtCadSuites"
                                                    PromptCharacter="" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    &Aacute;rea&nbsp;Total:</div>
                                                <asp:TextBox ID="txtCadAreaTotal" MaxLength="12" Width="82" onkeypress="mascaraMoeda();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    &Aacute;rea&nbsp;&Uacute;til:</div>
                                                <asp:TextBox ID="txtCadAreaUtil" MaxLength="12" Width="82" onkeypress="mascaraMoeda();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Vago:</div>
                                                <asp:TextBox ID="txtCadVago" MaxLength="20" Width="130" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Face:</div>
                                                <asp:TextBox ID="txtCadFace" MaxLength="20" Width="130" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Financiamento:</div>
                                                <asp:TextBox ID="txtCadFinanciamento" MaxLength="20" Width="130" ForeColor="DarkBlue"
                                                    Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    FGTS:</div>
                                                <asp:TextBox ID="txtCadFGTS" MaxLength="20" Width="130" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Permuta:</div>
                                                <asp:DropDownList ID="ddlCadPermuta" ForeColor="DarkBlue" Font-Bold="true" runat="server">
                                                    <asp:ListItem Text=" " Value=" "></asp:ListItem>
                                                    <asp:ListItem Text="Sim" Value="S"></asp:ListItem>
                                                    <asp:ListItem Text="N&atilde;o" Value="N"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Placa:</div>
                                                <asp:TextBox ID="txtCadPlaca" MaxLength="20" Width="130" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Chaves:</div>
                                                <asp:TextBox ID="txtCadChaves" MaxLength="20" Width="130" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                            </div>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Visitas:</div>
                                                <asp:TextBox ID="txtCadVisitas" MaxLength="20" Width="130" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Observa&ccedil;&otilde;es:</div>
                                                <asp:TextBox ID="txtCadObs" TextMode="MultiLine" MaxLength="0" Width="400px" Height="100px"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Promotor:</div>
                                                <asp:DropDownList ID="ddlCadIdPromotor" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server" DataTextField="Nome" DataValueField="PKString" AutoPostBack="true"
                                                    OnSelectedIndexChanged="ddlCadIdPromotor_SelectedIndexChanged">
                                                </asp:DropDownList>
                                                &nbsp;<asp:Label ID="lblPromotorFone" runat="server" Text=""></asp:Label>
                                                <asp:HyperLink ID="hlCadIdPromotor" runat="server" NavigateUrl="~/CadastroPessoa.aspx"
                                                    ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroPessoa"
                                                    ToolTip="Editar cadastro"></asp:HyperLink>
                                                <asp:ImageButton ID="ibCadIdPromotor" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                    ToolTip="Atualizar lista" OnClick="atualizarDdlIdPessoa" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Indicador:</div>
                                                <asp:DropDownList ID="ddlCadIdIndicador" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server" DataTextField="Nome" DataValueField="PKString" AutoPostBack="true"
                                                    OnSelectedIndexChanged="ddlCadIdIndicador_SelectedIndexChanged">
                                                </asp:DropDownList>
                                                &nbsp;<asp:Label ID="lblIndicadorFone" runat="server" Text=""></asp:Label>
                                                <asp:HyperLink ID="hlCadIdIndicador" runat="server" NavigateUrl="~/CadastroPessoa.aspx"
                                                    ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroPessoa"
                                                    ToolTip="Editar cadastro"></asp:HyperLink>
                                                <asp:ImageButton ID="ibCadIdIndicador" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                    ToolTip="Atualizar lista" OnClick="atualizarDdlIdPessoa" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Cliente:</div>
                                                <asp:DropDownList ID="ddlCadIdCliente" Width="76" ForeColor="DarkBlue" Font-Bold="true"
                                                    runat="server" DataTextField="Nome" DataValueField="PKString" AutoPostBack="true"
                                                    OnSelectedIndexChanged="ddlCadIdCliente_SelectedIndexChanged">
                                                </asp:DropDownList>
                                                &nbsp;<asp:Label ID="lblClienteFone" runat="server" Text=""></asp:Label>
                                                <asp:HyperLink ID="hlCadIdCliente" runat="server" NavigateUrl="~/CadastroPessoa.aspx"
                                                    ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/editar.gif" Target="CadastroPessoa"
                                                    ToolTip="Editar cadastro"></asp:HyperLink>
                                                <asp:ImageButton ID="ibCadIdCliente" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/atualizar.png"
                                                    ToolTip="Atualizar lista" OnClick="atualizarDdlIdPessoa" />
                                                <asp:RequiredFieldValidator ControlToValidate="ddlCadIdCliente" ErrorMessage="Preenchimento obrigat&oacute;rio."
                                                    ID="rfvDdlCadIdCliente" Display="None" runat="server" ValidationGroup="Salvar"
                                                    InitialValue="-1"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vceDdlCadIdCliente" runat="server" TargetControlID="rfvDdlCadIdCliente">
                                                </asp:ValidatorCalloutExtender>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <hr />
                                            <table>
                                                <tr>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                &Aacute;rea Comum:
                                                            </div>
                                                            <asp:GridView ID="grvCadImovelxareacomumReadonly" runat="server" AutoGenerateColumns="false"
                                                                EmptyDataText="N&atilde;o foram encontrados registros!" CellPadding="1" ForeColor="#333333"
                                                                GridLines="Both" RowStyle-ForeColor="#333333" RowStyle-BackColor="#F7F6F3" OnRowDataBound="grvCadImovelxareacomumReadonly_RowDataBound">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="&Aacute;rea Comum">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblAreaComumDesc" runat="server" Text="areaComum"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Obs">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblAreaComumObs" runat="server" Text="Obs"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                                <EditRowStyle BackColor="#999999" />
                                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                            </asp:GridView>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div class="FormDiv">
                                                            <div class="FormLabel">
                                                                Caracter&iacute;sticas:
                                                            </div>
                                                            <asp:GridView ID="grvCadImovelxcaracteristicaReadonly" runat="server" AutoGenerateColumns="false"
                                                                EmptyDataText="N&atilde;o foram encontrados registros!" CellPadding="1" ForeColor="#333333"
                                                                GridLines="Both" RowStyle-ForeColor="#333333" RowStyle-BackColor="#F7F6F3" OnRowDataBound="grvCadImovelxcaracteristicaReadonly_RowDataBound">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="Caracteristica">
                                                                        <ItemTemplate>
                                                                            <asp:HiddenField ID="hfIdCaracteristicas" runat="server" Value='<%#Eval("PKString") %>' />
                                                                            <asp:Label ID="lblCaracteristicasDesc" runat="server" Text="Label"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Obs">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lblCaracteristicasObs" runat="server" Text="Label"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                                <EditRowStyle BackColor="#999999" />
                                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                            </asp:GridView>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <hr />
                                            <table border="0" cellpadding="0" cellspacing="3">
                                                <tr>
                                                    <td class="FormLabel">
                                                        Data Cadastro:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Cadastrado por:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Data Edi&ccedil;&atilde;o:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Editado por:
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltDataCadastro" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltCadastradoPor" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltDataEdicao" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltEditadoPor" runat="server"></asp:Literal>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="tabImovelxareacomum" runat="server" HeaderText="Imovel&nbsp;X&nbsp;&Aacute;rea&nbsp;Comum">
                    <ContentTemplate>
                        <asp:Panel ID="panelImovelxareacomum" runat="server" BackColor="#eeeeee">
                            <div style="width: 100%; min-width: 400px; min-height: 300px;">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <div class="FormLabel">
                                                Im&oacute;vel:</div>
                                            <div class="FormControl">
                                                <asp:Literal ID="ltCadImovelxareacomumImovel" runat="server"></asp:Literal>
                                            </div>
                                            <hr />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Panel ID="panelCadImovelxareacomumBotoes" runat="server">
                                                <asp:Button ID="btnCadImovelxareacomumSalvar" runat="server" Enabled="False" ValidationGroup="ImovelxareacomumSalvar"
                                                    OnClick="btnCadImovelxareacomumSalvar_Click" Text="Salvar" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnCadImovelxareacomumCancelar" runat="server" OnClick="btnCadImovelxareacomumCancelar_Click"
                                                    Text="Cancelar" UseSubmitBehavior="false" />
                                                <asp:Button ID="btnCadImovelxareacomumEditar" runat="server" Enabled="False" OnClick="btnCadImovelxareacomumEditar_Click"
                                                    Text="Editar" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnCadImovelxareacomumExcluir" runat="server" Enabled="False"
                                                    OnClick="btnCadImovelxareacomumExcluir_Click" Text="Excluir" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnCadImovelxareacomumNovo" runat="server" OnClick="btnCadImovelxareacomumNovo_Click"
                                                    Text="Novo" UseSubmitBehavior="false" />
                                                <asp:ConfirmButtonExtender ID="ConfirmButtonExtenderImovelxareacomum" runat="server"
                                                    TargetControlID="btnCadImovelxareacomumExcluir" ConfirmText="Confirma a exclus&atilde;o de Imovel&nbsp;X&nbsp;&Aacute;rea&nbsp;Comum?">
                                                </asp:ConfirmButtonExtender>
                                                <hr />
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    idImovelXAreaComum:</div>
                                                <asp:TextBox ID="txtCadImovelxareacomumImovelxareacomum" MaxLength="11" Width="76"
                                                    onkeypress="strictNum();" ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                <asp:MaskedEditExtender ID="meetxtCadImovelxareacomumImovelxareacomum" runat="server"
                                                    Mask="99999999999" TargetControlID="txtCadImovelxareacomumImovelxareacomum" PromptCharacter="" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    &Aacute;rea&nbsp;Comum:</div>
                                                <asp:DropDownList ID="ddlCadImovelxareacomumIdAreaComum" Width="76" ForeColor="DarkBlue"
                                                    Font-Bold="true" runat="server" DataTextField="AreaComum" DataValueField="PKString">
                                                </asp:DropDownList>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Obs:</div>
                                                <asp:TextBox ID="txtCadImovelxareacomumObs" MaxLength="20" Width="130" ForeColor="DarkBlue"
                                                    Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <hr />
                                            <table border="0" cellpadding="0" cellspacing="3">
                                                <tr>
                                                    <td class="FormLabel">
                                                        Data Cadastro:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Cadastrado por:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Data Edi&ccedil;&atilde;o:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Editado por:
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxareacomumDataCadastro" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxareacomumCadastradoPor" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxareacomumDataEdicao" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxareacomumEditadoPor" runat="server"></asp:Literal>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                <hr />
                                <asp:GridView ID="grvCadImovelxImovelxareacomum" runat="server" AutoGenerateColumns="False"
                                    EmptyDataText="N&atilde;o foram encontrados registros!" CellPadding="1" ForeColor="#333333"
                                    GridLines="Both" RowStyle-ForeColor="#333333" RowStyle-BackColor="#F7F6F3" OnRowDataBound="grvCadImovelxImovelxareacomum_RowDataBound">
                                    <Columns>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <asp:HiddenField ID="hfIdImovelAreaComum" runat="server" Value='<%#Eval("PKString") %>' />
                                                <asp:ImageButton ID="imgbVisualizar" runat="server" OnClick="imgbCadImovelxareacomumVisualizar_Click"
                                                    ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>' />
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="&Aacute;rea Comum">
                                            <ItemTemplate>
                                                <asp:Label ID="lblAreaComumDesc" runat="server" Text="areaComum"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Obs">
                                            <ItemTemplate>
                                                <asp:Label ID="lblAreaComumObs" runat="server" Text="Obs"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#999999" />
                                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                </asp:GridView>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="tabImovelxcaracteristica" runat="server" HeaderText="Imovel&nbsp;X&nbsp;Caracter&iacute;stica">
                    <ContentTemplate>
                        <asp:Panel ID="panelImovelxcaracteristica" runat="server" BackColor="#eeeeee">
                            <div style="width: 100%; min-width: 400px; min-height: 300px;">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <div class="FormLabel">
                                                Im&oacute;vel:</div>
                                            <div class="FormControl">
                                                <asp:Literal ID="ltCadImovelxcaracteristicaImovel" runat="server"></asp:Literal>
                                            </div>
                                            <hr />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Panel ID="panelCadImovelxcaracteristicaBotoes" runat="server">
                                                <asp:Button ID="btnCadImovelxcaracteristicaSalvar" runat="server" Enabled="False"
                                                    ValidationGroup="ImovelxcaracteristicaSalvar" OnClick="btnCadImovelxcaracteristicaSalvar_Click"
                                                    Text="Salvar" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnCadImovelxcaracteristicaCancelar" runat="server" OnClick="btnCadImovelxcaracteristicaCancelar_Click"
                                                    Text="Cancelar" UseSubmitBehavior="false" />
                                                <asp:Button ID="btnCadImovelxcaracteristicaEditar" runat="server" Enabled="False"
                                                    OnClick="btnCadImovelxcaracteristicaEditar_Click" Text="Editar" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnCadImovelxcaracteristicaExcluir" runat="server" Enabled="False"
                                                    OnClick="btnCadImovelxcaracteristicaExcluir_Click" Text="Excluir" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnCadImovelxcaracteristicaNovo" runat="server" OnClick="btnCadImovelxcaracteristicaNovo_Click"
                                                    Text="Novo" UseSubmitBehavior="false" />
                                                <asp:ConfirmButtonExtender ID="ConfirmButtonExtenderImovelxcaracteristica" runat="server"
                                                    TargetControlID="btnCadImovelxcaracteristicaExcluir" ConfirmText="Confirma a exclus&atilde;o de Imovel&nbsp;X&nbsp;Caracter&iacute;stica?">
                                                </asp:ConfirmButtonExtender>
                                                <hr />
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    C&oacute;digo:</div>
                                                <asp:TextBox ID="txtCadImovelxcaracteristicaIdImovelXCaracteristica" MaxLength="11"
                                                    Width="76" onkeypress="strictNum();" ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                <asp:MaskedEditExtender ID="meetxtCadImovelxcaracteristicaIdImovelXCaracteristica"
                                                    runat="server" Mask="99999999999" TargetControlID="txtCadImovelxcaracteristicaIdImovelXCaracteristica"
                                                    PromptCharacter="" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Caracter&iacute;stica:</div>
                                                <asp:DropDownList ID="ddlCadImovelxcaracteristicaIdCaracteristica" Width="76" ForeColor="DarkBlue"
                                                    Font-Bold="true" runat="server" DataTextField="Caracteristica" DataValueField="PKString">
                                                </asp:DropDownList>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Obs:</div>
                                                <asp:TextBox ID="txtCadImovelxcaracteristicaObs" MaxLength="20" Width="130" ForeColor="DarkBlue"
                                                    Font-Bold="true" runat="server"></asp:TextBox>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <hr />
                                            <table border="0" cellpadding="0" cellspacing="3">
                                                <tr>
                                                    <td class="FormLabel">
                                                        Data Cadastro:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Cadastrado por:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Data Edi&ccedil;&atilde;o:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Editado por:
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxcaracteristicaDataCadastro" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxcaracteristicaCadastradoPor" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxcaracteristicaDataEdicao" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxcaracteristicaEditadoPor" runat="server"></asp:Literal>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                <hr />
                                <asp:GridView ID="grvCadImovelxImovelxcaracteristica" runat="server" AutoGenerateColumns="False"
                                    EmptyDataText="N&atilde;o foram encontrados registros!" CellPadding="1" ForeColor="#333333"
                                    GridLines="Both" RowStyle-ForeColor="#333333" RowStyle-BackColor="#F7F6F3" OnRowDataBound="grvCadImovelxImovelxcaracteristica_RowDataBound">
                                    <Columns>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <asp:ImageButton ID="imgbVisualizar" runat="server" OnClick="imgbCadImovelxcaracteristicaVisualizar_Click"
                                                    ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>' />
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Caracteristica">
                                            <ItemTemplate>
                                                <asp:HiddenField ID="hfIdCaracteristicas" runat="server" Value='<%#Eval("PKString") %>' />
                                                <asp:Label ID="lblCaracteristicasDesc" runat="server" Text="Label"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Obs">
                                            <ItemTemplate>
                                                <asp:Label ID="lblCaracteristicasObs" runat="server" Text="Label"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#999999" />
                                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                </asp:GridView>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="tabImovelxfoto" runat="server" HeaderText="Imovel&nbsp;X&nbsp;Foto">
                    <ContentTemplate>
                        <asp:Panel ID="panelImovelxfoto" runat="server" BackColor="#eeeeee">
                            <div style="width: 100%; min-width: 400px; min-height: 300px;">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <div class="FormLabel">
                                                Im&oacute;vel:</div>
                                            <div class="FormControl">
                                                <asp:Literal ID="ltCadImovelxfotoImovel" runat="server"></asp:Literal>
                                            </div>
                                            <hr />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Panel ID="panelCadImovelxfotoBotoes" runat="server">
                                                <asp:Button ID="btnCadImovelxfotoSalvar" runat="server" Enabled="False" ValidationGroup="ImovelxfotoSalvar"
                                                    OnClick="btnCadImovelxfotoSalvar_Click" Text="Salvar" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnCadImovelxfotoCancelar" runat="server" OnClick="btnCadImovelxfotoCancelar_Click"
                                                    Text="Cancelar" UseSubmitBehavior="false" />
                                                <asp:Button ID="btnCadImovelxfotoEditar" runat="server" Enabled="False" OnClick="btnCadImovelxfotoEditar_Click"
                                                    Text="Editar" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnCadImovelxfotoExcluir" runat="server" Enabled="False" OnClick="btnCadImovelxfotoExcluir_Click"
                                                    Text="Excluir" UseSubmitBehavior="false" />
                                                &nbsp;<asp:Button ID="btnCadImovelxfotoNovo" runat="server" OnClick="btnCadImovelxfotoNovo_Click"
                                                    Text="Novo" UseSubmitBehavior="false" />
                                                <asp:ConfirmButtonExtender ID="ConfirmButtonExtenderImovelxfoto" runat="server" TargetControlID="btnCadImovelxfotoExcluir"
                                                    ConfirmText="Confirma a exclus&atilde;o de Imovel&nbsp;X&nbsp;Foto?">
                                                </asp:ConfirmButtonExtender>
                                                <hr />
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    C&oacute;digo:</div>
                                                <asp:TextBox ID="txtCadImovelxfotoIdImovelxfoto" MaxLength="11" Width="76" onkeypress="strictNum();"
                                                    ForeColor="DarkBlue" Font-Bold="true" runat="server"></asp:TextBox>
                                                <asp:MaskedEditExtender ID="meetxtCadImovelxfotoIdImovelxfoto" runat="server" Mask="99999999999"
                                                    TargetControlID="txtCadImovelxfotoIdImovelxfoto" PromptCharacter="" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="FormDiv">
                                                <div class="FormLabel">
                                                    Foto:</div>
                                                <div class="FormControl">
                                                    <i>
                                                        <asp:Literal ID="ltCadImovelxfotoFotoLargeNome" runat="server"></asp:Literal>
                                                        (
                                                        <asp:Literal ID="ltCadImovelxfotoFotoLargeMime" runat="server"></asp:Literal>
                                                        )</i>
                                                </div>
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <asp:AsyncFileUpload ID="afuCadImovelxfotoFotoLargeUpload" runat="server" UploadingBackColor="Magenta"
                                                                OnUploadedComplete="ProcessafuCadImovelxfotoFotoLargeUpload" OnClientUploadComplete="showUploadConfirmation"
                                                                UploaderStyle="Traditional" Width="200" />
                                                        </td>
                                                        <td>
                                                            <asp:Button ID="btCadImovelxfotoFotoLargeRemover" runat="server" Text="Remover" Enabled="False"
                                                                OnClick="btCadImovelxfotoFotoLargeRemover_Click" />&nbsp;
                                                            <asp:Button ID="btCadImovelxfotoFotoLargeVisualizar" runat="server" Text="Visualizar"
                                                                Enabled="False" OnClick="btCadImovelxfotoFotoLargeVisualizar_Click" />
                                                            <asp:ConfirmButtonExtender ID="cbeBtCadImovelxfotoFotoLargeRemover" runat="server"
                                                                TargetControlID="btCadImovelxfotoFotoLargeRemover" ConfirmText="Confirma a exclus&atilde;o de Foto&nbsp;grande?">
                                                            </asp:ConfirmButtonExtender>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <hr />
                                            <table border="0" cellpadding="0" cellspacing="3">
                                                <tr>
                                                    <td class="FormLabel">
                                                        Data Cadastro:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Cadastrado por:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Data Edi&ccedil;&atilde;o:
                                                    </td>
                                                    <td class="FormLabel">
                                                        Editado por:
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxfotoDataCadastro" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxfotoCadastradoPor" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxfotoDataEdicao" runat="server"></asp:Literal>
                                                    </td>
                                                    <td class="FormControl">
                                                        <asp:Literal ID="ltImovelxfotoEditadoPor" runat="server"></asp:Literal>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                <hr />
                                <asp:GridView ID="grvCadImovelxImovelxfoto" runat="server" AutoGenerateColumns="False"
                                    EmptyDataText="N&atilde;o foram encontrados registros!" CellPadding="1" ForeColor="#333333"
                                    GridLines="Both" RowStyle-ForeColor="#333333" RowStyle-BackColor="#F7F6F3">
                                    <Columns>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <asp:ImageButton ID="imgbVisualizar" runat="server" OnClick="imgbCadImovelxfotoVisualizar_Click"
                                                    ImageUrl="~/App_Themes/Padrao/imagens/backoffice/editar.gif" CommandArgument='<%#Eval("PKString") %>' />
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="idImovelxfoto" HeaderText="C&oacute;digo" DataFormatString="{0:N0}" />
                                        <asp:BoundField DataField="FotoLargeNome" HeaderText="Foto" />
                                        <asp:BoundField DataField="FotoLargeMime" HeaderText="Tipo" />
                                        <asp:BoundField DataField="Cadastro" HeaderText="Cadastro" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}" />
                                        <asp:BoundField DataField="CadastradoPor" HeaderText="Nome" />
                                        <asp:BoundField DataField="Edicao" HeaderText="Edi&ccedil;&atilde;o" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}" />
                                        <asp:BoundField DataField="EditadoPor" HeaderText="Nome" />
                                    </Columns>
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#999999" />
                                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                </asp:GridView>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
            <asp:Panel ID="PanelFoto" runat="server" Visible="false">
                <div style="position: fixed; top: 0; left: 0; background-color: Gray; filter: alpha(opacity=50);
                    opacity: .5; width: 100%; height: 100%; vertical-align: middle; text-align: center;">
                </div>
                <div style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; font-size: medium;
                    font-weight: bold;">
                    <table style="width: 100%; height: 100%;">
                        <tr>
                            <td align="center" valign="middle">
                                <asp:Table ID="tbPanelFoto" runat="server" CellPadding="0" CellSpacing="0">
                                    <asp:TableRow>
                                        <asp:TableCell HorizontalAlign="Right">
                                            <asp:ImageButton ID="ibtPanelFotoClose" runat="server" ImageUrl="~/App_Themes/Padrao/imagens/backoffice/fechar.png"
                                                OnClick="ibtPanelFotoClose_Click" />
                                        </asp:TableCell>
                                    </asp:TableRow>
                                    <asp:TableRow ID="tbrowPanelFoto" runat="server">
                                        <asp:TableCell ID="tbcellPanelFoto" runat="server" BackColor="#707070" Style="vertical-align: middle;
                                            text-align: center; padding: 5px 10px 5px 10px;">
                                            <center>
                                                <asp:Image ID="imgPanelFoto" runat="server" Style="max-width: 800px; max-height: 600px;" /><br />
                                                <asp:Label ID="lblPanelFoto" runat="server" Text="" Style="color: White;"></asp:Label>
                                        </asp:TableCell>
                                    </asp:TableRow>
                                </asp:Table>
                                <asp:RoundedCornersExtender ID="rcePanelFoto" runat="server" TargetControlID="tbcellPanelFoto"
                                    Radius="8">
                                </asp:RoundedCornersExtender>
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
